package com.sunshine.lnuplusweb.dao;

import com.sunshine.lnuplusweb.entities.Schedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 课表Dao
 * 用于后端从数据库中获取数据
 * 具体操作在res/mapper/*Mapper.xml中
 */
@Mapper
public interface ScheduleMapper {
    //通过用户id获取课表
    List<Schedule> getScheduleByUser(@Param("userId") String userId);

    //创建课表
    void insertSchedule(
            @Param("scheduleId") int scheduleId,
            @Param("userId") String userId,
            @Param("scheduleName") String scheduleName);
}
